<?php

	$action = $_POST['action']?$_POST['action']:$_GET['action'];	
	switch($action)
	{
		case 'checkreg':
			$html = '<div class="step send" style="display:none;"><div class="step-t"><h4>2.设置密码</h4></div><ul><li><span>密&nbsp;码：</span><font><input type="password" name="password"/></font></li><li><span>重复密码：</span><font><input type="password" name="repassword"/></font></li><li><button class="btn" onclick="next(\'send\');">提&nbsp;交</button><button class="btn last" onclick="next(\'last\');return false;">上一步</button></li></ul><div class="notice">	<h5>温馨提示：</h5><p>1.密码请尽量设置相对复杂的字母和数字组合，防止破解。</p></div></div>';
			die(json_encode(array('res'=>'OK','html'=>$html)));
			break;
		case 'sid':
			$_COOKIE['_sid'] ? session_id($_COOKIE['_sid']) : die('null');
			session_start();
			$inf = $_SESSION['userinfo'];
			$data = array('uid'=>$inf['id'],'uname'=>$inf['nickname'],'face'=>$inf['face']);
			cookie(array('_url'=>$_GET['_url']),$time = 3600);
			if($inf && (time()-$_COOKIE['_time']) < OUTTIME)
			{
				cookie(array('_time'=>time()),$time = 3600);
				echo 'var u ='.json_encode($data); 
			}
			exit;
			break;
		default:
			die('Err!');
			break;
	}
?>